'''
Created on Jun 3, 2011

@author: Pavel_Vinogradov
'''
from collections import defaultdict

#From http://stackoverflow.com/questions/2210581/map-list-of-tuples-into-a-dictionary-python
def tuplelist2dict(myTupleList):
    myDict = defaultdict(str)

    for key, val in myTupleList:
        myDict[key] += val
    
    return myDict